package cn.juque.redoctopus.bo.field;

import java.io.Serializable;
import java.util.List;
import lombok.Data;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;

/**
 * @author nuoka
 * @version 1.0.0
 * <li></li>
 * @date 2021/11/13 17:51
 **/
@Data
public class FieldDocBO implements Serializable {

    /**
     * The score of this document for the query.
     */
    private Float score;

    /**
     * A hit document's number.
     *
     * @see IndexSearcher#doc(int)
     */
    private Integer doc;

    /**
     * Only set by {@link TopDocs#merge}
     */
    private Integer shardIndex;

    /**
     * Expert: The values which are used to sort the referenced document. The order of these will match the original
     * sort criteria given by a Sort object.  Each Object will have been returned from the <code>value</code> method
     * corresponding FieldComparator used to sort this field.
     *
     * @see Sort
     * @see IndexSearcher#search(Query, int, Sort)
     */
    private List<Long> fields;
}
